# coding: utf-8
from enum import Enum

from qfluentwidgets import StyleSheetBase, Theme, qconfig

from .settings import RESOURCES_DIR

resources_dir = RESOURCES_DIR.as_posix()


class StyleSheet(StyleSheetBase, Enum):
    """ Style sheet  """
    LINK_CARD = "link_card"
    SAMPLE_CARD = "sample_card"
    BUTTON = "button"
    LIST_VIEW = "list_view"

    def path(self, theme=Theme.AUTO):
        theme = qconfig.theme if theme == Theme.AUTO else theme
        return f"{resources_dir}/qss/{theme.value.lower()}/{self.value}.css"
